package com.lanxiao.cloud.modules.oauth.infrastructure.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanxiao.cloud.modules.oauth.domain.model.Permission;
import com.lanxiao.cloud.modules.oauth.domain.model.Role;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * @author ：qiaoliang
 * @date ：2021-08-19
 */
@Component
public interface RoleMapper extends BaseMapper<Role> {

  /**
   *   通过用户ID获取角色列表
   *
   * @author ：qiaoliang
   * @param userId : 用户ID
   * @return com.lanxiao.platform.oauth.domain.model.Permission
   * @date 2021-08-25 16:54
   */
  List<Role> findByUserRole(@Param("userId") Long userId);

}
